﻿using System;

namespace TYBase
{
    public static class TimeExtend
    {
        public static string AsString(this DateTime dt, string format = "yyyy-MM-dd HH:mm:ss")
        {
            return dt.ToString(format);
        }

        public static string AsFileNameString(this DateTime dt, string format = "yyyy_MM_dd_HH_mm_ss")
        {
            return dt.ToString(format);
        }
    }
}